package cn.itrip.common;

import java.util.Random;
import java.util.UUID;

/**
 * Created by Administrator on 2018/11/23.
 */
public class ValiditorCodeUtil {

            public static String getCode(int length){
                // 替换-

                return UUID.randomUUID().toString().replace("-","").substring(length);

            }
         public static String getCode(){
        // 替换-

        return UUID.randomUUID().toString().replace("-","");

    }

    public static String getPhoneCode() {
        Random random=new Random();

        return ""+random.nextInt(10)+random.nextInt(10)+random.nextInt(10)+random.nextInt(10);
    }
}
